//
// Created by 21577 on 2025/3/4.
//
#include<stdio.h>
#include<string.h>

int main(){
    char ch[10000];
    gets(ch);
    int digital=0,letter=0,space=0;
    int length = strlen(ch);
    for(int i=0 ;i<length;i++){
        if((ch[i]>='a'&&ch[i]<='z')||(ch[i]>='A'&&ch[i]<='Z'))
            letter++;
        else if(ch[i]>='0'&&ch[i]<='9')
            digital++;
        else if(ch[i]==' ')
            space++;
    }
    printf("%d %d %d",letter,digital,space);
    return 0;
}